home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 37.dms / 37.adf / the demo.bas < prev    next >
BASIC Source File  |  1988-05-22  |  10KB  |  317 lines

  1. 5     goto 300
  2. 10    AUDIO 15,1
  3. 11    A$ = TRANSLATE$("HELLO I AM THE NEW AMIGA PERSONAL COMPUTER FROM COMMODORE!")
  4. 12    B$ = TRANSLATE$("I HAVE A SHORT DEMO FOR YOU TO SEE. BUT FIRST I WANT TO TELL YOU A LITTLE ABOUT MYSELF.")
  5. 13    C$ = TRANSLATE$("FIRST OFF I AM RUNNING IN AE BASIC CREATED BY METACOMP, FOR THE AMIGA, IT CAME FREE WITH ME.")
  6. 14    D$ = TRANSLATE$("I HAVE BUILT IN SPRITES ,BLITTERS ,SPEECH SYNTHISYS ,STEREO SOUND ,AND I AM I.B.M COMPATIBLE. THE LIST GOES ON AND ON.")
  7. 15    E$ = TRANSLATE$("I HAVE GRAPHIC CAPABILITIES THAT WILL BLOW YOUR MINDTHEY ARE SECOND TO NONE LISA MY GRAPHICS CHIP HANDLES THAT.")
  8. 16    F$ = TRANSLATE$("MY SOUND IS EXCELENT THANKS TO DAFNEE MY SOUND CHIP SHE MADE THIS PROGRAM SO EASY.")
  9. 17    X% = NARRATE (A$) 
  10. 18    X% = NARRATE (B$)
  11. 19    X% = NARRATE (C$)
  12. 20    X% = NARRATE (D$)
  13. 21    X% = NARRATE (E$)
  14. 22    X5 = NARRATE (F$)
  15. 23    SCNCLR
  16. 24    c = 1 : x = 10 : y = 10 : d = 10 : h = 1
  17. 25    penb 2
  18. 26    paint (0,50)
  19. 27    circle (x,y), d, h
  20. 28    x1 = x1+3 
  21. 29    y = y+3
  22. 30    d = d+2
  23. 31    peno c
  24. 32    c = c + 1
  25. 33    if c = 31 then c = 1
  26. 34    circle (x1,y), d, h
  27. 35    IF Y = 166 THEN SLEEP 5*10^6 :SCNCLR :GOTO 37 
  28. 36    goto 28
  29. 37    CIRCLE (145,90), 0, 1
  30. 38    penb 4 : paint (0,0) :c = 1 : peno c
  31. 39    S1 = S1+1
  32. 40    c = c + 1 : if c = 31 then c = 1
  33. 41    peno c
  34. 42    CIRCLE (145,90), S1, 1
  35. 43    IF S1 = 90 THEN SLEEP 5*10^6 :SCNCLR : GOTO 45
  36. 44    GOTO 39
  37. 45    draw (1,1 to 320,1)
  38. 46    y1 = y1+1
  39. 47    c = c+1 : pena c : if c = 31 then c = 1
  40. 48    draw (1,y1 to 320,y1)
  41. 49    if y1 = 190 then sleep 5*10^6 : scnclr : goto 54 
  42. 50    goto 46
  43. 51    B$ = TRANSLATE$("THANK YOU FOR WATCHING THE DEMO.")
  44. 52    X% = NARRATE (B$)
  45. 53    end
  46. 54    draw (1,1 to 1,190)
  47. 55    x2 = x2+1
  48. 56    c = c+1 : pena c : if c = 31 then c = 1
  49. 57    draw (x2,1 to x2,190)
  50. 58    if x2 = 300 then sleep 5*10^6 :scnclr : goto 60
  51. 59    goto 55
  52. 60    draw (1,1 to 1,1)
  53. 61    x3 = x3+1 
  54. 62    y3 = y3+1 
  55. 63    c =c+1 : pena c : if c = 31 then c = 1
  56. 64    draw (x3,1 to 1,y3)
  57. 65    if y3 = 200 then sleep 5*10^6 : scnclr : goto 67
  58. 66    goto 61
  59. 67    draw (1,190 to 1,1)
  60. 68    x5 = x5+1
  61. 69    c = c+1 : pena c : if c = 31 then c = 1
  62. 70    draw (1,190 to x5,1)
  63. 71    if x5 = 320 then goto 73
  64. 72    goto 68
  65. 73    y6 = y6+1
  66. 74    c = c+1 : pena c : if c = 31 then c = 1
  67. 75    draw (1,190 to 320,y6)
  68. 76    if y6 = 190 then sleep 5*10^6 : scnclr : goto 78
  69. 77    goto 73
  70. 78    ? "TO EXIT NEXT DEMO PRESS LEFT"
  71. 79    ? "           MOUSE BUTTON"
  72. 80    SLEEP 5*10^6
  73. 81    scnclr
  74. 82    penb 6
  75. 83    paint (50,50)
  76. 84    c=1
  77. 85    x = 24 : y = 50
  78. 86    z = 24 : k = 100
  79. 87    dx = 3 : dy =3
  80. 88    dz = 6 : dk = 6
  81. 89    draw (x,y to z,k)
  82. 90    c = c+1 : pena c
  83. 91    x = x + dx
  84. 92    z = z + dz
  85. 93    if x < 4 or x > 300 then dx = - dx
  86. 94    if z < 4 or z > 300 then dz = - dz
  87. 95    y = y + dy
  88. 96    k = k + dk
  89. 97    if y < 5 or y > 190 then dy = - dy
  90. 98    if k < 5 or k > 190 then dk = -dk
  91. 99    if c = 31 then c = 1
  92. 100   ask mouse x%, y%, b%
  93. 101   if b% <> 0 then goto 103
  94. 102   goto 89
  95. 103   scnclr
  96. 104   c = 1 :pena c
  97. 105   draw (100,150 to 100,145 to 105,145 to 150,50 to 145,50)
  98. 106   draw (145,50 to 145,45 to 175,45 to 175,50 to 170,50 to 185,145)
  99. 107   draw (185,145 to 190,145 to 190,150 to 170,150 to 170,145)
  100. 108   draw (170,145 to 175,145 to 168,100 to 136,100)
  101. 109   draw (136,100 to 115,145 to 120,145 to 120,150 to 100,150)
  102. 110   draw (100,150 to 95,148 to 95,143 to 100,143 to 145,50)
  103. 111   draw (145,50 to 140,48 to 140,43 to 170,43 to 175,45)
  104. 112   draw (95,143 to 100,145)
  105. 113   draw (145,45 to 140,43)
  106. 114   draw (115,143 to 120,145)
  107. 115   draw (100,143 to 105,145)
  108. 116   draw (170,150 to 165,148 to 165,143 to 170,143 to 163,100)
  109. 117   draw (170,143 to 175,145)
  110. 118   draw (166,90 to 162,60 to 155,60 to 141,90 to 166,90)
  111. 119   draw (185,143 to 190,145)
  112. 120   draw (161,88 to 157,60)
  113. 121   draw (161,88 to 142,88)
  114. 122   draw (161,88 to 166,90)
  115. 123   draw (165,143 to 170,145)
  116. 124   paint (10,10)
  117. 125   c = c + 1 : pena c : if c = 31 then goto 127
  118. 126   goto 105
  119. 127   scnclr
  120. 128   pena 1 : paint (10,10)
  121. 129   s = 10
  122. 130   y1 = 180
  123. 131   peno 4
  124. 132   circle (160,y1), s, .10
  125. 133   y1 = y1-6
  126. 134   s = s + ((s*.1)^1.3)
  127. 135   if y1 = 12 then sleep 5*10^6 : goto 137
  128. 136   goto 131
  129. 137   scnclr
  130. 138   pena 1
  131. 139   paint (10 , 10)
  132. 140   xc = 160 : yc = 90 : z = 0 : k =pi / 40
  133. 141   n = int(rnd(1)*17) 
  134. 142   pena n
  135. 143   for j = 0 to 1 : next : n = k
  136. 144   xd = int (rnd(1) * xc) : yd = int(rnd(1) * yc) : c = int(rnd(1)*5)
  137. 145   xa = xc + xd * cos(n) : xb = xc - xd * cos(n)
  138. 146   ya = yc + yd * sin(n) : yb = yc - yd * sin(n)
  139. 147   draw (xa,ya to xb,yb)
  140. 148   n = n + k : if n < pi then 145
  141. 149   ask mouse x% , y% , b%
  142. 150   if b% <>0 then goto 152
  143. 151   for j = 0 to 1 : next : goto 141
  144. 152   scnclr
  145. 153   x = 320 : y = 200 : c = x * rnd(0) : d = y * rnd (0)
  146. 154   a=0 : b=0 : j =0 : k=1 : n=2 : p=1
  147. 155   pena j : draw (a,j to c,d to a,y)
  148. 156   pena k : draw (a+k,j to c,d to a+k,y)
  149. 157   a=a+n : if a < x then 155
  150. 158   pena j : draw (j,b to c,d to x,b)
  151. 159   pena k : draw (j,b+k to c,d to x,b+k)
  152. 160   b=b+n : if b<y then 158
  153. 161   sleep 5*10^6 : goto 162
  154. 162   scnclr
  155. 163   drawmode 1
  156. 164   dim d(128,64)
  157. 165   input "number of levels 1 through 7" ; le
  158. 166   ?"hit c for coustom colours"
  159. 167   ?"return for default"
  160. 168   get a$ : if a$ = "" then 168
  161. 169   if a$ = chr$ (13) then lc = 7 : sc = 10
  162. 170   if a$ = "c" then gosub 287
  163. 171   ds = 2 : for n =1 to le : ds = ds + 2 ^ (n-1) : next n
  164. 172   mx = ds-1 : my = mx / 2
  165. 173   rh = pi*30/180 :vt = rh *1.2
  166. 174   for n = 1 to le : l = 10000 / 1.8^n
  167. 175   ?"working on level" ; n
  168. 176   ib = mx / 2^n : sk = ib *2
  169. 177   gosub 186
  170. 178   gosub 193
  171. 179   gosub 200
  172. 180   next n
  173. 181   scnclr
  174. 182   pena 1
  175. 183   paint (10,10) ,0
  176. 184   goto 235
  177. 185   rem******
  178. 186   for ye = 0 to mx-1 step sk
  179. 187   for xe = ib + ye to mx step sk
  180. 188   ax = xe - ib : ay = ye : gosub 208 : d1 = d : ax = xe + ib : gosub 208 : d2 = d
  181. 189   d = (d1+d2)/2 + rnd(5) * l / 2 - l / 4 : ax = xe : ay =ye : gosub 213
  182. 190   next xe
  183. 191   next ye : return
  184. 192   rem *************
  185. 193   for xe = mx to 1 step -sk
  186. 194   for ye = ib to xe step sk
  187. 195   ax = xe : ay = ye + ib : gosub 208 : d1 = d : ay = ye -ib : gosub 208 : d2 = d
  188. 196   d = (d1+d2) / 2 + rnd(1)* l / 2 - l / 4 : ax = xe : ay =ye : gosub 213
  189. 197   next ye
  190. 198   next xe : return
  191. 199   rem******************
  192. 200   for xe= 0 to mx - 1 step sk
  193. 201   for ye = ib to mx - xe step sk
  194. 202   ax= xe +ye - ib : ay = ye - ib : gosub 208 : d1 = d
  195. 203   ax = xe + ye +ib : ay = ye + ib : gosub 208 : d2 = d
  196. 204   ax = xe + ye : ay = ye : d= (d1 + d2 )/ 2 + rnd ( 1 ) * l / 2 - l / 4 : gosub 213 
  197. 205   next ye 
  198. 206   next xe : return
  199. 207   rem****************
  200. 208   if ay > my then 210
  201. 209   by = ay : bx= ax : goto 211
  202. 210   by = mx +1 - ay : bx = mx -ax
  203. 211   d= d ( bx , by ) : return
  204. 212   rem*************
  205. 213   if ay > my then 215
  206. 214   by = ay : bx = ax : goto 216
  207. 215   by = mx + 1 - ay : bx = mx - ax
  208. 216   d( bx , by ) = d : return
  209. 217   rem**********************
  210. 218   if xo <> -999 then 221
  211. 219   if zz < 0 then gosub 280 : z2 = zz : zz = 0 : goto 233
  212. 220   gosub 282 : goto 232
  213. 221   if z2 > 0 and zz > 0 then 232
  214. 222   if z2 <0 and zz < 0 then z2 = zz : zz = 0 : goto 233
  215. 223   w3 = zz / (zz-z2) : x3 = (x2-xx)*w3+xx : y3 = (y2-yy)*w3+yy : z3 = 0
  216. 224   zt = zz : yt = yy : xt = xx
  217. 225   if zz > 0 then 230
  218. 226   rem*****************
  219. 227   zz = z3 : yy = y3 : xx = x3 : gosub 266
  220. 228   gosub 280 : zz = 0 : yy = yt : xx = xt : z2 = zt : goto 233
  221. 229   rem ******************
  222. 230   zz = z3 : yy = y3 : xx = x3 : gosub 266
  223. 231   gosub 282 : zz = zt : yy = yt : xx = xt
  224. 232   z2 = zz
  225. 233   x2 = xx : y2 = yy : return
  226. 234   rem ****************
  227. 235   gosub 283
  228. 236   xs = .04 : ys = .04 : zs = .04
  229. 237   for ax = 0 to mx : xo=-999 : for ay = 0 to ax
  230. 238   gosub 208 : zz = d : yy = ay / mx * 10000 : xx = ax / mx *10000 -yy / 2
  231. 239   gosub 265 : next ay : next ax
  232. 240   for ay = 0 to mx : xo = -999 : for ax = ay to mx
  233. 241   gosub 208 : zz = d : yy = ay / mx *10000 : xx = ax / mx *10000 -yy / 2
  234. 242   gosub 265 : next ax : next ay
  235. 243   for ex = 0 to mx : xo = -999 : for ey = 0 to mx - ex
  236. 244   ax = ex + ey : ay = ey : gosub 208 : zz = d : yy = ay / mx *10000
  237. 245   xx = ax / mx *10000 - yy / 2 : gosub 265 : next ey : next ex
  238. 246   goto 285
  239. 247   rem********
  240. 248   if xx <> 0 then 251
  241. 249   if yy <=0 then ra = - pi / 2 : goto 253
  242. 250   ra = pi / 2 : goto 253
  243. 251   ra = atn(yy/xx)
  244. 252   if xx < 0 then ra = ra + pi
  245. 253   r1 = ra + rh : rd = sqr(xx*xx+yy*yy)
  246. 254   xx = rd *cos(r1) : yy = rd * sin(r1)
  247. 255   return
  248. 256   rem******
  249. 257   rd = sqr(zz*zz+xx*xx)
  250. 258   if xx = 0 then ra = pi / 2 : goto 261
  251. 259   ra = atn (zz/xx)
  252. 260   if xx <0 then ra = ra+pi
  253. 261   r1 = ra-vt
  254. 262   xx = rd *  cos(r1)+xx : zz = rd * sin(r1)
  255. 263   return
  256. 264   rem *************
  257. 265   gosub 218
  258. 266   xx = xx * xs : yy = yy * ys : zz = zz *zs
  259. 267   gosub 248
  260. 268   gosub 257
  261. 269   if xo = - 999 then pr$ = "m"
  262. 270   if xo <> -999 then pr$ = "d"
  263. 271   xp = int(yy)+cx : yp = int(zz)
  264. 272   gosub 275
  265. 273   return
  266. 274   rem*********
  267. 275   xp = xp * 0.625 : yp = 33.14-0.663 *yp
  268. 276   if pr$ = "m" then x8 = xp : y8 = yp : xo = x
  269. 277   if y8 > 179 or y8 < 0 or yp > 179 or yp< 0 then return
  270. 278   draw (x8,y8 to xp,yp)
  271. 279   x8 = xp : y8 = yp : return
  272. 280   pena sc : return
  273. 281   rem***********
  274. 282   pena lc : return
  275. 283   return
  276. 284   rem *******
  277. 285   sleep 5*10^6 : goto 51
  278. 286   end
  279. 287   rem*****
  280. 288   input "choose high colour 2 to 16" ; lc
  281. 289   input "choose high colour 2 to 16" ; sc
  282. 290   return
  283. 300   screen 0,5,0
  284. 301   rgb 0,6,9,15
  285. 302   rgb 1,0,0,2
  286. 303   rgb 2,0,0,4
  287. 304   rgb 3,0,0,6
  288. 305   rgb 4,0,0,8
  289. 306   rgb 5,0,0,10
  290. 307   rgb 6,0,0,12
  291. 308   rgb 7,0,0,14
  292. 309   rgb 8,0,1,15
  293. 310   rgb 9,0,3,15
  294. 311   rgb 10,0,5,15
  295. 312   rgb 11,0,7,15
  296. 313   rgb 12,0,9,15
  297. 314   rgb 13,0,10,15
  298. 315   rgb 14,0,11,15
  299. 316   rgb 15,0,12,15
  300. 317   rgb 16,0,13,15
  301. 318   rgb 17,0,15,15
  302. 319   rgb 18,1,15,15
  303. 320   rgb 19,2,15,15
  304. 321   rgb 20,2,15,15
  305. 322   rgb 21,3,15,15
  306. 323   rgb 22,5,15,15
  307. 324   rgb 23,6,15,15
  308. 325   rgb 24,7,15,15
  309. 326   rgb 25,8,15,15
  310. 327   rgb 26,9,15,15
  311. 328   rgb 27,10,15,15
  312. 329   rgb 28,11,15,15
  313. 330   rgb 29,12,15,15
  314. 331   rgb 30,13,15,15
  315. 332   rgb 31,15,15,15
  316. 333   goto 10
  317.